package com.example.mall.util.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
public class SpringBootPlusException extends RuntimeException{
    private Integer errorCode;
    private String message;
    private String data;

    public SpringBootPlusException(String message) {
        super(message);
        this.message = message;
    }

    public SpringBootPlusException(Integer errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
        this.message = message;
    }

//    public SpringBootPlusException(StateCode errorCode, String data) {
//        super(data);
//        this.errorCode = errorCode.getCode();
//        this.message = errorCode.getMessage();
//        this.data = data;
//    }
}
